//
//  UIImageView+MSImageView.m
//  TakeOutForBusiness
//
//  Created by iOS on 2017/5/4.
//  Copyright © 2017年 GSKJ. All rights reserved.
//

#import "UIImageView+MSImageView.h"

@implementation UIImageView (MSImageView)

- (void)ms_setImageWithURLString:(nullable NSString *)URLString
{
    [self ms_setImageWithURLString:URLString
                  placeholderImage:nil];
}

- (void)ms_setImageWithURL:(nullable NSURL *)url
{
    [self ms_setImageWithURL:url
            placeholderImage:nil];
}

- (void)ms_setImageWithURL:(nullable NSURL *)url
          placeholderImage:(nullable UIImage *)img
{
    [self sd_setImageWithURL:url
            placeholderImage:img];
}

- (void)ms_setImageWithURLString:(nullable NSString *)URLString
                placeholderImage:(nullable UIImage *)img
{
    [self ms_setImageWithURL:MSURL(URLString)
            placeholderImage:img];
}

- (void)ms_setImageWithURLString:(nullable NSString *)URLString
                placeholderImage:(nullable UIImage *)placeholder
                         options:(SDWebImageOptions)options
                       completed:(nullable SDExternalCompletionBlock)completedBlock
{
    [self ms_setImageWithURL:MSURL(URLString)
            placeholderImage:placeholder
                     options:options
                   completed:completedBlock];
}

- (void)ms_setImageWithURL:(nullable NSURL *)url
          placeholderImage:(nullable UIImage *)placeholder
                   options:(SDWebImageOptions)options
                 completed:(nullable SDExternalCompletionBlock)completedBlock
{
    [self sd_setImageWithURL:url
            placeholderImage:placeholder
                     options:options
                    progress:nil
                   completed:completedBlock];
}

- (void)ms_setImageWithURLString:(nullable NSString *)URLString
                 completed:(nullable SDExternalCompletionBlock)completedBlock
{
    [self ms_setImageWithURL:MSURL(URLString)
                    completed:completedBlock];
}

- (void)ms_setImageWithURL:(nullable NSURL *)url
                 completed:(nullable SDExternalCompletionBlock)completedBlock {
    [self sd_setImageWithURL:url
                    completed:completedBlock];
}

@end
